//
//  ViewController.m
//  FinalBlock
//
//  Created by dllo on 16/8/19.
//  Copyright © 2016年 yh. All rights reserved.
//

#import "ViewController.h"
#import "SecViewController.h"
@interface ViewController ()
@property (strong, nonatomic) IBOutlet UILabel *label;

@end

@implementation ViewController
- (IBAction)push:(id)sender {
    SecViewController *vc = [[SecViewController alloc] init];
    SecViewController * __weak weakVC = vc;
    weakVC.passTitle = ^(NSString *title) {
        self.label.text = title;
        weakVC.view.backgroundColor = [UIColor cyanColor];
    };
    [self.navigationController pushViewController:vc animated:YES];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
